import requsets from '@/plugins/requests'
// 点位管理
export const regionSearchAPI = (params) => requsets({
  url: '/api/vm-service/region/search',
  params
})
// 点位搜索
export const nodeSearchAPI = (params) => requsets({
  url: '/api/vm-service/node/search',
  params
})
// 修改区域
export const regionEditAPI = ({ id, regionName, remark }) => requsets({
  url: `/api/vm-service/region/${id}`,
  method: 'PUT',
  data: {
    regionName,
    remark
  }
})
// 新增
export const regionNewCreateAPI = ({ regionName, remark }) => requsets({
  url: '/api/vm-service/region',
  method: 'POST',
  data: {
    regionName,
    remark
  }
})
// 获取区域详情
// export const regionDetailAPI = ({ id, pageIndex, pageSize }) => requsets({
//   url: `/api/vm-service/region/${id}`,
//   params: {
//     pageIndex,
//     pageSize
//   }
// })
// 商圈列表
export const businessTypeAPI = () => requsets({
  url: '/api/vm-service/businessType'
})
// 合作商搜索
export const partnerSearchAPI = (params) => requsets({
  url: '/api/user-service/partner/search',
  params
})
// 新增点位
export const addNodeAPI = (data) => requsets({
  url: '/api/vm-service/node',
  method: 'POST',
  data
})
// 点位详情
export const nodeDatailsAPI = (id) => requsets({
  url: `/api/vm-service/node/vmList/${id}`
})
// 修改点位
export const repairNodeAPI = (id, data) => requsets({
  url: `/api/vm-service/node/${id}`,
  method: 'PUT',
  data
})
